package com.gitee.wsl.func.callback

/**
 * A common callback for listening for values
 */
fun interface ValueCallback<in T> {

    /**
     * Delivers values to the host (typically an [Observer])
     */
    fun onNext(value: T)
}

/**
 * Convenience method for [ValueCallback.onNext]
 */
operator fun <T> ValueCallback<T>.invoke(value: T) {
    onNext(value)
}
